﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BestEasyCMS.Framework.Domain;

namespace BestEasyCMS.Model
{
    public abstract class Entity<TId> : EntityBase<TId>, IAggregateRoot
    {
        /// <summary>
        /// 状态
        /// </summary>
        public int? State { get; set; }
        /// <summary>
        /// 是否删除
        /// </summary>
        public bool? IsDel { get; set; }
        /// <summary>
        /// 是否启用
        /// </summary>
        public bool? IsEnable { get; set; }
        /// <summary>
        /// 创建用户
        /// </summary>
        public string CreateUser { get; set; }
        /// <summary>
        /// 修改用户
        /// </summary>
        public string UpdateUser { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime? CreateTime { get; set; }
        /// <summary>
        /// 修改时间
        /// </summary>
        public DateTime? UpdateTime { get; set; }

        protected override void Validate()
        {
            Verify();
        }
        protected abstract void Verify();
    }
}
